package p270jp.pxv.android.mywork.presentation.activity;

import android.os.Bundle;
import androidx.activity.ComponentActivity;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;
import androidx.fragment.app.BackStackRecord;
import androidx.lifecycle.ViewModelStore;
import p047bg.C1124a;
import p081cn.progressionUtil;
import p189gn.AbstractC3435a;
import p216hn.Lambda;
import p216hn.Reflection;
import p270jp.pxv.android.R;
import p294ko.ViewModelOwner;
import p314lg.ActivityNovelDraftListBinding;
import p325m0.MutabilityOwnership;
import p497sj.AbstractActivityC6049b;
import p575vj.NovelDraftListStore;
import p600wj.NovelDraftListFragment;

/* compiled from: NovelDraftListActivity.kt */
/* renamed from: jp.pxv.android.mywork.presentation.activity.NovelDraftListActivity */
/* loaded from: classes2.dex */
public final class NovelDraftListActivity extends AbstractActivityC6049b {

    /* renamed from: b0 */
    public ActivityNovelDraftListBinding f19144b0;

    /* renamed from: c0 */
    public NovelDraftListStore f19145c0;

    /* compiled from: ActivityExt.kt */
    /* renamed from: jp.pxv.android.mywork.presentation.activity.NovelDraftListActivity$a */
    /* loaded from: classes2.dex */
    public static final class C4268a extends Lambda implements AbstractC3435a<ViewModelOwner> {

        /* renamed from: a */
        public final /* synthetic */ ComponentActivity f19146a;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4268a(ComponentActivity componentActivity) {
            super(0);
            this.f19146a = componentActivity;
        }

        @Override // p189gn.AbstractC3435a
        public ViewModelOwner invoke() {
            ComponentActivity componentActivity = this.f19146a;
            MutabilityOwnership.m3745m(componentActivity, "storeOwner");
            ViewModelStore viewModelStore = componentActivity.getViewModelStore();
            MutabilityOwnership.m3746l(viewModelStore, "storeOwner.viewModelStore");
            return new ViewModelOwner(viewModelStore, componentActivity);
        }
    }

    @Override // p270jp.pxv.android.activity.AbstractActivityC4151b, androidx.activity.ComponentActivity, android.app.Activity
    public void onBackPressed() {
        NovelDraftListStore gVar = this.f19145c0;
        if (gVar != null) {
            if (gVar.f29151d) {
                setResult(3);
            }
            super.onBackPressed();
            return;
        }
        MutabilityOwnership.m3737u("novelDraftListStore");
        throw null;
    }

    @Override // p270jp.pxv.android.activity.AbstractActivityC4151b, p270jp.pxv.android.activity.BaseActivity, androidx.fragment.app.FragmentActivity, androidx.activity.ComponentActivity, p248j2.ActivityC3902g, android.app.Activity
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        ViewDataBinding d = DataBindingUtil.m11369d(this, R.layout.activity_novel_draft_list);
        MutabilityOwnership.m3746l(d, "setContentView(this, R.l…ctivity_novel_draft_list)");
        ActivityNovelDraftListBinding h0Var = (ActivityNovelDraftListBinding) d;
        this.f19144b0 = h0Var;
        C1124a.m10197Q(this, h0Var.f21643s, R.string.label_draft);
        this.f19145c0 = (NovelDraftListStore) progressionUtil.m9685e(this, null, null, new C4268a(this), Reflection.m5499a(NovelDraftListStore.class), null);
        NovelDraftListFragment bVar = new NovelDraftListFragment();
        BackStackRecord cVar = new BackStackRecord(m11131K0());
        ActivityNovelDraftListBinding h0Var2 = this.f19144b0;
        if (h0Var2 != null) {
            cVar.m11165j(h0Var2.f21641q.getId(), bVar);
            cVar.mo11171d();
            return;
        }
        MutabilityOwnership.m3737u("binding");
        throw null;
    }
}
